﻿
@{
    ViewData["Title"] = "服务支付";
    Layout = "~/Areas/WX/Views/Shared/_Layout.cshtml";
}



<header class="hui-header">
    <div id="hui-back"></div>
    <h1>结账支付</h1>
</header>


<div class="hui-wrap">
    <form style="padding:28px 10px;" class="hui-form" id="form1">

        <div class="hui-form-items">
            <div class="hui-form-items-title" style="margin-left:50px;">师傅</div>
            <div class="hui-form-select">
                <select class="form-control" style="width:150px;" id="sf" asp-items="ViewBag.ServicePersonId"></select>
            </div>
        </div>

        <div class="hui-form-items">
            <div class="hui-form-items-title" style="margin-left:50px;">服务项目</div>
            <div class="hui-form-select">
                <select class="form-control" style="width:150px;" id="fw" asp-items="ViewBag.ValueAddedServicesId"></select>
            </div>
        </div>


        <div id="star1" style="padding:22px 0px;margin-left:50px;"></div>

        <button type="button" id="btn1" class="hui-button hui-button-large hui-primary" style="margin-top:15px;">支付</button>


    </form>
</div>


<div class="hui-fooer-line"></div>
<div id="hui-footer">
    <a href="/WX/Home/Index" id="nav-home">
        <div class="hui-footer-icons hui-icons-home"></div>
        <div class="hui-footer-text">首页</div>
    </a>
    <a href="/WX/Home/PayBills" id="nav-news">
        <div class="hui-footer-icons hui-icons-news"></div>
        <div class="hui-footer-text">支付</div>
    </a>
    <div style="width:20%; text-align:center;" class="hui-fl">
        <img src="~/images/jmlogo.jpg" height="44" onclick="hui.back();" />

    </div>
    <a href="/WX/Home/NoticeList" id="nav-forum">
        <div class="hui-footer-icons hui-icons-forum"></div>
        <div class="hui-footer-text">公告</div>
    </a>
    <a href="/WX/Home/PersonalPage" id="nav-my">
        <div class="hui-footer-icons hui-icons-my"></div>
        <div class="hui-footer-text">我的</div>
    </a>
</div>



@section Scripts{


    <script src="~/HUI-master/js/hui-star.js"></script>
    <script>
        var star1 = new huiStar('#star1');
        star1.draw();
        hui('#star1').find('.hui-icons-star').eq(4).trigger('click');
        hui('#btn1').click(function () {
            var starVal = star1.getVal();
            var sf = $("#sf option:selected").attr("value");
            var fw = $("#fw option:selected").attr("value");
            hui.post(
                '/WX/Home/ServicePayment',
                { servicePersonId: sf, valueAddedServicesId: fw, score: starVal },
                function (msg) {
                    if (msg == 'ok') {
                        hui.alert('支付成功！', '好的', function () { window.location.href = '/WX/Home/PayBills' });
                    } else {
                        hui.alert(msg, '好的');
                    }
                },
                function (e) {
                    hui.iconToast('读取消息失败', 'warn');
                }
            );
        });
    </script>
}
